//
//  HandleHeadView.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2018/9/7.
//  Copyright © 2018年 DUONIU_MAC. All rights reserved.
//

import UIKit

class HandleHeadView: UIView {
    
    let bankView = ButtonView() //所有银行
    let useView = ButtonView() //所有用途
    let gradeView = ButtonView() //所有等级

    override init(frame: CGRect) {
        super.init(frame: frame)
        
        bankView.text = allBanks
        bankView.tag = 0
        self.addSubview(bankView)
        
        useView.text = allUse
        useView.tag = 1
        self.addSubview(useView)
        
        gradeView.text = allGrade
        gradeView.tag = 2
        self.addSubview(gradeView)
        
        let lineView = UIView()
        lineView.backgroundColor = UIColor.lineColor()
        self.addSubview(lineView)
        
        bankView.snp.makeConstraints { (make) in
            make.left.top.bottom.equalToSuperview()
            make.width.equalTo(ScreenW/3)
        }
        
        useView.snp.makeConstraints { (make) in
            make.top.centerX.bottom.equalToSuperview()
            make.width.equalTo(bankView)
        }
        
        gradeView.snp.makeConstraints { (make) in
            make.top.right.bottom.equalToSuperview()
            make.width.equalTo(useView)
        }
        
        lineView.snp.makeConstraints { (make) in
            make.left.right.bottom.equalToSuperview()
            make.height.equalTo(1)
        }
        
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
